LGF_DTLToString_ISO (FC / 3.1.1)

Overview

Author: Siemens Digital Industry

Short description

This function converts a date of data type DTL into a character string of data type STRING in international format (ISO) (YYYY MM DD…).

Block Interface

LGF_DTLToString_ISO (FC)
DTL  date Ret_Val  String
    
Char  separator   
    
Char  separatorDateAndTime   
    
   

Input parameter

IdentifierData type Description
dateDTL Date to convert as DTL tag
separatorChar Separator between the components of the output date.
separatorDateAndTimeChar Separator between the components date and time.

Output parameter

IdentifierData type Description
Ret_ValString Output string in accordance with the international format (ISO 8601).
Example: `2019-01-22 14:06:51.524621000`

Functional description

The block reads a date of data type DTL and converts the individual components of the date (year, month, day, hour…) into a character string and outputs it in international format (ISO 8601). The separator between the components of the date is variable.

International format (ISO 8601):

LGF_DTLToString_ISO - Structure of the character string in accordance with ISO 8601

Separator:

At the input parameter separator, you specify the separator between the components of the date, at seperatorDateAndTime you specify the separator between the date and the time.

Example:

Change log

Version & DateChange description
1.0.0Siemens Industry Online Support
15.06.2016First released version
1.0.1Siemens Industry Online Support
02.01.2017Upgrade: TIA Portal V14 Update 1
1.0.2Siemens Industry Online Support
17.08.2018Upgrade: TIA V15 Update 2
1.0.3Siemens Industry Online Support
23.11.2018Upgrade: TIA V15.1
1.0.4Simatic Systems Support
17.07.2019Bugfix - nanosecond precision and '0' filling
1.0.5Simatic Systems Support
18.07.2019Renamed from "LGF_DTLtoString" to "LGF_DTLToString_ISO"
Split into two blocks, removed "format" input
3.0.0Simatic Systems Support
23.04.2020Set version to V3.0.0
Harmonize the version of the whole library
3.0.1Simatic Systems Support
23.02.2021Insert documentation
3.1.0Simatic Systems Support
25.07.2025Insert parameter for separator between Data and time
Assign default value '-' for separator parameter
3.1.1Simatic Systems Support
09.10.2025Spelling errors